﻿
    <Page
    x:Class="InternetCafeApp.View.MaintainClient"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:InternetCafeApp.View"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid Background="#3dc9e7">
            <Grid.RowDefinitions>
                <RowDefinition Height="100" />
                <RowDefinition Height="*" />
                <RowDefinition Height="30" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" Background="#FF328918" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
                <TextBlock x:Name="pageTitle" Text="List Client" Style="{StaticResource PageHeaderTextStyle}" Grid.Column="1" IsHitTestVisible="false"/>
                <TextBlock x:Name="txtTotalRoomCount" Text="{Binding Clients.Count}" TextAlignment="Right" Style="{StaticResource PageHeaderTextStyle}" Grid.Column="1" IsHitTestVisible="false"/>
            </Grid>
            <Grid Grid.Row="1" >
                <ListView ItemsSource="{Binding Clients}">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="200" />
                                    <ColumnDefinition Width="200" />
                                    <ColumnDefinition Width="200" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="50"/>
                                    <RowDefinition Height="50"/>
                                </Grid.RowDefinitions>
                                <TextBlock Text="{Binding oiclient}" Grid.Column="0" Grid.Row="0" FontSize="30" />
                                <ToggleSwitch Grid.Column="1" Grid.Row="0"  x:Name="tgGender" IsOn="{Binding gender}" OnContent="Male" OffContent="Female" />
                                <TextBlock Text="{Binding name}" Grid.Column="2" Grid.Row="0" FontSize="30" />
                                <TextBlock Text="{Binding active}" Grid.Column="0" Grid.Row="1"  FontSize="20" />
                                <TextBlock Text="{Binding modDate}" Grid.Column="1" Grid.Row="1"  FontSize="20" />
                            </Grid>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </Grid>

        </Grid>
    </Page>